<?php

namespace Wonfu\Openapi;

class Path
{
    /**
     * @var string
     */
    public $summary;

    /**
     * @var string
     */
    public $description;


    public $get;

    public $post;

    public $head;

    public $options;

    public $put;

    public $patch;

    public $delete;

    public $trace;


    /**
     * @param string $name
     * @param $value
     */
    public function __set(string $name, $value)
    {
        if (!in_array($name, ["get", "post", "head", "options", "put", "patch", "delete", "trace"])) {
            throw new UnExpectedParametersException('method must is one of {"get", "post", "head", "options", "put", "patch", "delete", "trace"}');
        }
        $this->$name = $value;
    }

}